package com.qfedu.kbonline.dao;

import com.qfedu.kbonline.entity.Doctor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;



/**
 * @description: 牛逼哄哄的代码生成器
 * @author: 韩智飞
 * @create: 2020-09-15 13:14:02
 */
public interface DoctorDao {
    /*新增*/
    @Insert("insert into doctor (id,uid,name,rankId,hospital,askCount,replyCount,avgReplyTime,specialty,price,experience,departmentId) values(#{id},#{uid},#{name},#{rankId},#{hospital},#{askCount},#{replyCount},#{avgReplyTime},#{specialty},#{price},#{experience},#{departmentId})")
    int insert(Doctor doctor);

    /*删除*/
    @Delete("delete from doctor where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from doctor")
    Doctor all();
}